﻿
Namespace DAL


    Public Class Label_DAL

        Shared Function traerDescripcion(ByVal pnombreCrl As String, ByVal pidIdioma As Integer, ByVal pnombreFrm As String)

            Dim ds As New DataSet

            Dim strcomm As String
            strcomm = "SELECT label FROM labels WHERE nombre_ctrl = '" & pnombreCrl & "' AND id_idioma = " & pidIdioma & " AND nombre_frm = '" & pnombreFrm & "'"
            ds = Helper_DAL.ExecuteDataset(strcomm)

            If ds.Tables(0).Rows.Count = 0 Then
                Return ""
            Else
                Return ds.Tables(0).Rows(0).Item(0).ToString()
            End If
        End Function


        Shared Function traerDescripcionToolTip(ByVal pnombreCrl As String, ByVal pidIdioma As Integer, ByVal pnombreFrm As String)

            Dim ds As New DataSet

            Dim strcomm As String
            strcomm = "SELECT tooltip FROM labels WHERE nombre_ctrl = '" & pnombreCrl & "' AND id_idioma = " & pidIdioma & " AND nombre_frm = '" & pnombreFrm & "'"
            ds = Helper_DAL.ExecuteDataset(strcomm)

            If ds.Tables(0).Rows.Count = 0 Then
                Return ""
            Else
                Return ds.Tables(0).Rows(0).Item(0).ToString()
            End If
        End Function

    End Class


End Namespace